<?php
$id = intval($_GET['id']);
$blog = model('blog')->get_one($id);
$comments = model('comment')->get_list(array('blog_id'=>$id));
$title = $blog['name'];
?><!-- INCLUDE header.html -->

<div id='content'>
	<div id='left'>
		<div class="entry">
			<a href="{item_link($blog)}"><h2>{$blog['name']}</h2></a>
			<div class="time">{date("F/jS Y",$blog['create_time'])}</div>
			<div class="intro">{$blog['content']}</div>
			<div class="info">
				<a class="comments">10 Comments</a>
			</div>
		</div>
		<a name="comments" ></a>
		<div class="comments">
			{foreach($comments as $c)}
			<a name="comment{$c['comment_id']}" ></a>
			<div class="comment">
				<div class="info">{date("Y-m-d H:i",$c['time'])} {$c['name']}:</div>
				<div class="content">{$c['content']}</div>
			</div>
			{/foreach}
		</div>
    </div>
	<!-- INCLUDE sidebar.html -->
	<div class="clear"></div>
</div>

<!-- INCLUDE footer.html -->